package dao;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import vo.StairVO;

import mybatis.service.FactoryService;

public class Stair_F_dao {

	public int getChapterMax_stair(){
		return FactoryService.getFactory().openSession().selectOne("chapterMax_stair");
	}
	public StairVO getAtChapter_stair(int chapter){
		return FactoryService.getFactory().openSession().selectOne("atChapter_stair",chapter);
	}
	
	public int setAtStair(StairVO vo){
		SqlSession ss = FactoryService.getFactory().openSession();
		if(ss.insert("set_stair", vo)==1)
			ss.commit();
		else
			return 0;
		return 1;
	}
}
